import React, { Component } from 'react'
import { BrowserRouter, Switch, Route } from 'react-router-dom'

//views
import IndexPage from '#views/IndexPage/IndexPage'
import BlogList from '#views/BlogList/BlogList'
import Me from '#views/Me/Me'
import Tech from '#views/Tech/Tech'
import Comment from '#views/Comment/Comment'
import Detail from '#views/Detail/Detail'

class App extends Component {
  constructor(props) {
    super(props)
  }
  render() {
    return (
      <BrowserRouter basename="/home">
        <section className="box">
          <div className="main">
            <Switch>
              <Route path="/detail/:id" component={Detail}></Route>
              <Route path="/comment" component={Comment}></Route>
              <Route path="/list" component={BlogList}></Route>
              <Route path="/me" component={Me}></Route>
              <Route path="/tech" component={Tech}></Route>
              <Route exact path="/" component={IndexPage}></Route>
            </Switch>
          </div>
        </section>
      </BrowserRouter>
    )
  }
}

export default App
